package com.ccq.controller;

import com.ccq.service.BrokerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = { "front" })
public class BrokerController {
    @Autowired
    BrokerService brokerService;

    @ApiOperation(value="经纪人列表",notes = "经纪人列表")
    @RequestMapping(value = { "brokerlist" },method = RequestMethod.POST)
    @ResponseBody
    public String brokerlist(){
        String ls=brokerService.borkerlist();
        return ls;
    }

    @ApiOperation(value="点赞",notes = "点赞")
    @RequestMapping(value = { "nice" },method = RequestMethod.POST)
    @ResponseBody
    public String nice(int id){
        String ls=brokerService.nices(id);
        return ls;
    }


    @ApiOperation(value="成交数排序",notes = "成交数排序")
    @RequestMapping(value = { "chengjiao" },method = RequestMethod.POST)
    @ResponseBody
    public String chengjiao(){
        String ls=brokerService.chengjiaos();
        return ls;
    }

    @ApiOperation(value="带看数",notes = "带看数")
    @RequestMapping(value = { "zuling" },method = RequestMethod.POST)
    @ResponseBody
    public String zuling(){
        String ls=brokerService.zuling();
        return ls;
    }

    @ApiOperation(value="点赞数",notes = "点赞数")
    @RequestMapping(value = { "dianzan" },method = RequestMethod.POST)
    @ResponseBody
    public String dianzan(){
        String ls=brokerService.dianzan();
        return ls;
    }
    @ApiOperation(value="区域筛选",notes = "区域筛选")
    @RequestMapping(value = { "adress1"},method = RequestMethod.POST)
    @ResponseBody
    public String adress1(String adress){
        String ls=brokerService.quyu(adress);
        return ls;
    }

}
